home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / INSERT REPLACE_FINDDATA.SCRIPT < prev    next >
Encoding:
Text File  |  2000-11-08  |  672 b   |  27 lines

  1. !!Script
  2. // Copyright ⌐ 1997-1998 - Modelworks Software
  3.  
  4. // Insert script helper for:
  5.  
  6. /**
  7. @Object: Editor 
  8. @Method: replace(data, findData) - replaces the range specified by the findData 
  9. object with the data.  Data can be either a string or another editor. Returns 
  10. the range inserted.
  11. @Syntax: editor.replace(data, findData)
  12. @Summary: replace - replaces the range specified by the findData 
  13. */
  14.  
  15. function DoCommand()
  16. {
  17.   var editor = getActiveEditor();
  18.   if (editor)
  19.   {
  20.     var selection = editor.getSelection();
  21.     editor.replace("editor.replace(data, findData);", selection);
  22.     editor.setActive("Insert editor.replace");
  23.   }
  24. }
  25.  
  26. !!/Script
  27.